package com.gymmsystem.GYMMSystem.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("user_messages")
public class UserMessage {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("user_id")
    @JsonProperty("userId")
    private Long userId;

    @TableField("title")
    @JsonProperty("title")
    private String title;

    @TableField("content")
    @JsonProperty("content")
    private String content;

    @TableField("type")
    @JsonProperty("type")
    private String type;

    @TableField("is_read")
    @JsonProperty("isRead")
    private Integer isRead;

    @TableField("related_id")
    @JsonProperty("relatedId")
    private Long relatedId;

    @TableField(value = "created_at", fill = FieldFill.INSERT)
    @JsonProperty("createdAt")
    private LocalDateTime createdAt;
}